Loading TOC...

GET /manage/v2/databases/{id|name}/triggers/{id|name}/properties

Summary

This resource address returns the configuration properties of the named alert trigger.

URL Parameters
format The format of the posted data. Can be either json or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the request body. If the format? parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns status code 200 (OK). The response body contains the requested data. If the trigger does not exist, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Usage Notes

The structure of the output returned from this REST API is as follows:

id

The trigger ID.

name

The trigger name.

description

The trigger description.

event

The description of event.

This is a complex structure with the following children:

data-event

The description of triggering events.

This is a complex structure with the following children:

document-scope

The scope of a single document for a trigger.

This is a complex structure with the following children:

uri

The URI.

collection-scope

The scope of all documents in a collection for a trigger.

This is a complex structure with the following children:

uri

The URI.

directory-scope

The scope of descendant documents of a directory for a trigger.

This is a complex structure with the following children:

uri

The URI.

depth

The depth.

document-content

The document content.

This is a complex structure with the following children:

update-kind

The kind of update.

any-property-content

The document properties.

any-custom-property-content

The custom document properties.

property-content

The specific document property.

This is a complex structure with the following children:

property-name

The QName of a property.

This is a complex structure with the following children:

namespace-uri

The namespace URI.

localname

The localname.

when

The timing of the event.

database-online-event

The description of a database coming online.

This is a complex structure with the following children:

user

The user unique ID.

user-id

The user unique ID.

user-name

The user unique name.

module

The module path

module-db

The module database

module-root

The module root

enabled

Whether the trigger is enabled or not.

recursive

Whether the trigger is recursive or not.

task-priority

The post-commit task priority.

permissions

The default set of permissions used in document creation.

This is a complex structure with the following children:

permission

Permission representation.

This is a complex structure with the following children:

role-name

The Role name (unique)

capability

The action/task permitted by a permission

Example


curl -X GET  --anyauth -u admin:admin --header "Content-Type:application/json" \
http://localhost:8002/manage/v2/databases/myTriggers/triggers/my-trigger/properties

==>  Returns the properties of the "my-trigger" trigger for the myTriggers
     database. 
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.